# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        
        # Adding model 'Shop'
        db.create_table('shop_shop', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=60)),
            ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=60, db_index=True)),
            ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('opening_date', self.gf('django.db.models.fields.DateField')()),
            ('closing_date', self.gf('django.db.models.fields.DateField')()),
            ('order_target', self.gf('django.db.models.fields.IntegerField')()),
            ('price', self.gf('django.db.models.fields.DecimalField')(max_digits=16, decimal_places=2)),
            ('address_required', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal('shop', ['Shop'])

        # Adding model 'HoodieColour'
        db.create_table('shop_hoodiecolour', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('colour', self.gf('django.db.models.fields.CharField')(max_length=15)),
            ('rgb', self.gf('django.db.models.fields.CharField')(max_length=6)),
            ('shop', self.gf('django.db.models.fields.related.ForeignKey')(related_name='hoodie_colour_colour', to=orm['shop.Shop'])),
        ))
        db.send_create_signal('shop', ['HoodieColour'])

        # Adding model 'HoodieSize'
        db.create_table('shop_hoodiesize', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('size', self.gf('django.db.models.fields.CharField')(max_length=5)),
            ('colour', self.gf('django.db.models.fields.related.ForeignKey')(related_name='hoodie_size_colour', to=orm['shop.HoodieColour'])),
        ))
        db.send_create_signal('shop', ['HoodieSize'])

        # Adding model 'Order'
        db.create_table('shop_order', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('first_name', self.gf('django.db.models.fields.CharField')(max_length=15)),
            ('surname', self.gf('django.db.models.fields.CharField')(max_length=15)),
            ('email', self.gf('django.db.models.fields.EmailField')(max_length=40)),
            ('phone_number', self.gf('django.db.models.fields.CharField')(max_length=15)),
            ('address_line_1', self.gf('django.db.models.fields.CharField')(max_length=25)),
            ('address_line_2', self.gf('django.db.models.fields.CharField')(max_length=25)),
            ('city', self.gf('django.db.models.fields.CharField')(max_length=25)),
            ('postcode', self.gf('django.db.models.fields.CharField')(max_length=10)),
            ('shop', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['shop.Shop'])),
            ('size', self.gf('django.db.models.fields.CharField')(max_length=3)),
            ('colour', self.gf('django.db.models.fields.CharField')(max_length=15)),
        ))
        db.send_create_signal('shop', ['Order'])


    def backwards(self, orm):
        
        # Deleting model 'Shop'
        db.delete_table('shop_shop')

        # Deleting model 'HoodieColour'
        db.delete_table('shop_hoodiecolour')

        # Deleting model 'HoodieSize'
        db.delete_table('shop_hoodiesize')

        # Deleting model 'Order'
        db.delete_table('shop_order')


    models = {
        'shop.hoodiecolour': {
            'Meta': {'object_name': 'HoodieColour'},
            'colour': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'rgb': ('django.db.models.fields.CharField', [], {'max_length': '6'}),
            'shop': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'hoodie_colour_colour'", 'to': "orm['shop.Shop']"})
        },
        'shop.hoodiesize': {
            'Meta': {'object_name': 'HoodieSize'},
            'colour': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'hoodie_size_colour'", 'to': "orm['shop.HoodieColour']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'size': ('django.db.models.fields.CharField', [], {'max_length': '5'})
        },
        'shop.order': {
            'Meta': {'object_name': 'Order'},
            'address_line_1': ('django.db.models.fields.CharField', [], {'max_length': '25'}),
            'address_line_2': ('django.db.models.fields.CharField', [], {'max_length': '25'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '25'}),
            'colour': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '40'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'phone_number': ('django.db.models.fields.CharField', [], {'max_length': '15'}),
            'postcode': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
            'shop': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['shop.Shop']"}),
            'size': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
            'surname': ('django.db.models.fields.CharField', [], {'max_length': '15'})
        },
        'shop.shop': {
            'Meta': {'object_name': 'Shop'},
            'address_required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'closing_date': ('django.db.models.fields.DateField', [], {}),
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
            'opening_date': ('django.db.models.fields.DateField', [], {}),
            'order_target': ('django.db.models.fields.IntegerField', [], {}),
            'price': ('django.db.models.fields.DecimalField', [], {'max_digits': '16', 'decimal_places': '2'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '60', 'db_index': 'True'})
        }
    }

    complete_apps = ['shop']
